from pms.common.views import PostFormula
from user.utils.profile import role_view
from user.models import Role


class API(PostFormula):

    def handle(self, req):
        rid = req['id']
        role = Role.objects.get(id=rid)
        return self.success_respond(role_view(role))
